
        <HTML>
		<HEAD>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Flash MX 2004 ActionScript2.0 Library: Quaternion - Wright Internet Solutions">
		<meta name="keywords" content="algebra,Quaternion,Flash,MX,2004,ActionScript,ActionScript2.0,AS2.0 Library,AS2,AS2 Library,Wright Internet Solutions,Wright,class,documentation,methods,functions,interfaces,JavaScript,Java">
		<TITLE>WIS AS2 Library : com.wis.math.alg.Quaternion Documentation</TITLE>

		<STYLE><!--
		HR.small{height:1px; width:100%; background:#E7BFA3; border: 0px;}
		HR.big{height:4px; width:100%; background:#E7BFA3; border: 0px;}
		A:hover{text-decoration: underline}
		A{text-decoration: none; color: #993333}
		code{font-family: monospace; font-size: 12px; color: #666666;}
		.methodAttributesTitle{font-size: 12px; font-weight: bold; color: #7B779C}
		.ToC{font-size: 12px; font-weight: bold; color: #993333}
		.methodTitle{font-size: 14px; font-weight: bold; color: #993333}
		.groupTitle{font-size: 18px; font-weight: bold; color: #993333}
		.sectionTitle{font-size: 22px; font-weight: bold; color: #993333}
		.majorTitle{font-size: 32px; font-weight: bold; color: #993333; padding-bottom:100px;}
		.methodsDiv{margin-left:40px;}
		.footer{font-size: 11px; color: #666666;}
		body{font-family: arial,sans-serif; font-size: 12px;}
		//--></STYLE>

		</HEAD>
		<BODY bgColor='#ffffcc'>
		<P class='majorTitle'>com.wis.math.alg.Quaternion Documentation</P>


		<P><B>Author:</B> <a href='mailto:wisolutions2002@shaw.ca?subject=wisASLibrary Quaternion Class'>Richard Wright</a><BR>
		<B>Last Modified:</B> 08/05/04 21:44:49<HR class='big'>

		<P class='sectionTitle'>Summary</P>
		<P class='ToC'>com.wis.math.alg.Quaternion class:</P>
		<div class='methodsDiv'><a href='#classinfo'>- description</a></div>
<P class='ToC'>com.wis.math.alg.Quaternion Properties:</P><div class='methodsDiv'>
<a href='#w'>- w</a><br>
<a href='#V'>- V</a><br>
</div><br>
<P class='ToC'>com.wis.math.alg.Quaternion Methods:</P><div class='methodsDiv'>
<a href='# toString'>-  toString</a><br>
<a href='# resetComponents'>-  resetComponents</a><br>
<a href='# copyComponents'>-  copyComponents</a><br>
<a href='# magnitude'>-  magnitude</a><br>
<a href='# normalize'>-  normalize</a><br>
<a href='# multiply'>-  multiply</a><br>
<a href='# axisAngle'>-  axisAngle</a><br>
<a href='# rotationMatrix'>-  rotationMatrix</a><br>
</div><br>

		<HR class='big'>
		<P class='sectionTitle'><A name='classinfo'></A>com.wis.math.alg.Quaternion <I>class</I></P>
		<P> <span class='methodTitle'>version:</span> 1.7</P>
		<P class="methodTitle">description:</P>
		<P>Implements the behaviours of the Quaternion Class -- provides
 methods for quaternion transformation.
 		        <p>
 I've swayed from using '$' as a class-based variable identifier for
 this class due to the increased usage of UI-defined class variables
 for this group of classes: Point, Vector, Quaternion, Col, and ColMC
 classes all reflect this format.
 </P>
		<P class="methodTitle">usage:</P> <pre>var inst:Quaternion = new Quaternion(x,y,z,w)</pre>

<P> <span class='methodTitle'>parameters:</span>
				<ul>
<li>      x (Number)  -- x-axis component of quaternion.</li>
<li>      y (Number)  -- y-axis component of quaternion.</li>
<li>      z (Number)  -- z-axis component of quaternion.</li>
<li>      w (Number)  -- transform component of quaternion.</li>
</ul>

			<HR class='small'>
			<P class='groupTitle'><A name='properties'></A>com.wis.math.alg.Quaternion Properties:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name='w'></A><u> w</u></P>
				<P> (Number)  -- 'w' component property.</P>

				<P class='methodTitle'><A name='V'></A><u> V</u></P>
				<P> (Vector)  -- Vector component property.</P>
</div>

			<HR class='small'>
			<P class='groupTitle'><A name='methods'></A>com.wis.math.alg.Quaternion Methods:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name=' toString'></A><u>  toString</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Makes quaternion trace-able.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.toString();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (String)  -- returns a string representation of this instance's properties.
    </P>

				<P class='methodTitle'><A name=' resetComponents'></A><u>  resetComponents</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Resets the components of the quaternion.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.resetComponents(w,x,y,z);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  w   (Number)  -- a real number.</li>
<li>  x   (Number)  -- a real number.</li>
<li>  y   (Number)  -- a real number.</li>
<li>  z   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' copyComponents'></A><u>  copyComponents</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Copies the components of the quaternion 'q' into this instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.copyComponents(q);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  q   (Quaternion)  -- an object that contains copied components.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' magnitude'></A><u>  magnitude</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Defines the magnitude of the quaternion.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.magnitude();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns magnitude of this instance.
    </P>

				<P class='methodTitle'><A name=' normalize'></A><u>  normalize</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Normalizes the quaternion.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.normalize();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' multiply'></A><u>  multiply</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Defines the multiplication of this instance with 'q'.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.multiply(q);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  q   (Quaternion)  -- a Quaternion object.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Quaternion)  -- returns a new Quaternion object that contains the multiplication of this instance with 'q'.
    </P>

				<P class='methodTitle'><A name=' axisAngle'></A><u>  axisAngle</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Sets the elements of the quaternion to represent a
     rotation around the unit vector 'A' by an angle of theta.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.axisAngle(theta,A);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  theta   (Number)  -- a real number representing angle input.</li>
<li>  A   (Vector)  - a direction Vector object.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' rotationMatrix'></A><u>  rotationMatrix</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Calculates the rotation matrix of the quaternion.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.rotationMatrix();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Matrix)  -- returns the rotation matrix of this instance.
    </P>
</div>

			<BR>
			<BR>
			<HR class='big'>
			<span class="footer">generated with <A href='http://blog.klaustrofobik.org/' target='_blank'>AS2docGenerator beta 0.5.3</A></span>
			</BODY>
			</HTML>

